// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'

//vuex
import store from './store'

Vue.config.productionTip = false;
Vue.prototype.router = router;
/**********************************************************/


//引入第三方类库

/**
 * ElementUI
 * http://element-cn.eleme.io/#/zh-CN/component/installation/
 */
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';

Vue.use(ElementUI);

/**
 * MintUI
 * https://mint-ui.github.io/docs/#/zh-cn2
 */
// import MintUI from 'mint-ui'
// import 'mint-ui/lib/style.css'
//
// Vue.use(MintUI)

import mavonEditor from 'mavon-editor'
import 'mavon-editor/dist/css/index.css'
// use
Vue.use(mavonEditor);

/**
 * axios
 * http://www.mamicode.com/info-detail-2219622.html
 */
import axios from "axios";

window.axios = axios;
axios.defaults.withCredentials = true;

//api服务器地址
window.apis = process.env.API_ROOT;

//WS服务器地址
window.ws = process.env.WS_ADDR;

window.webTitle = document.title;

// 公共方法
import './app/funcitons'

/**********************************************************/
/* eslint-disable no-new */
window.vm = new Vue({
  el: '#app',
  router,
  store, // 把 store 对象提供给 “store” 选项，这可以把 store 的实例注入所有的子组件
  components: {App},
  template: '<App/>',
  render: h => h(App)
});
